package com.longge;

import java.util.Arrays;
import java.util.HashSet;

public class MostWordsFound {

    public int mostWordsFound(String[] sentences) {

        int ans = 0;
        for (String sentence : sentences) {
            String[] strs = sentence.split(" ");
            ans = Math.max(ans, new HashSet<>(Arrays.asList(strs)).size());
        }
        return ans;
    }

}
